package com.isoft.service.impl;

import com.isoft.dao.impl.AddressBookDAOImpl;
import com.isoft.dao.impl.IAddressBookDAO;
import com.isoft.pojo.Person;

public class AddressBooksServiceImpl implements IAddressDookService{//alt+enter
    IAddressBookDAO addressBookDAO;

    public AddressBooksServiceImpl() {
        addressBookDAO=new AddressBookDAOImpl();
    }

    @Override
    public int insert(Person person) {
        int i = addressBookDAO.insert(person);
        return i;
    }

    @Override
    public Person findByName(String name) {
        return addressBookDAO.findByName(name);
    }

    @Override
    public int deleteByName(String name) {
        return addressBookDAO.deleteByName(name);
    }

    @Override
    public int updateByName(Person person) {
        return addressBookDAO.updateByName(person);
    }
}
